import math

if __name__ == '__main__':
	n = 0
	cnt = int(input())
	while cnt > 0:
		n = n + 1
		val = int((1 + n) * n / 2)
		s = int(math.sqrt(val))
		if s * s == val:
			cnt = cnt - 1
			if cnt == 0:
				print(val)
